This page last changed on Jan 03, 2012 by jed.wheeler@involver.com.
A phrasebook file is a tab-separated file containing four columns: page, locale, name, and translation. One line will exist for each translation.
- Page will be a tag (not to be confused with sml tag) which denotes that a given translation belongs to a given page (e.g. translations for a product detail page might have a tag of 'product' or 'pdp'). Only a single tag is allowed for each translation. No individual page tag may contain more than 1000 rows, which will be enforced on upload. Commas and whitespace are not allowed in a page tag. An empty (null) page tag is allowed, but will only ever match translations if no page tags are specified in the SML settings.
- Locale will normally be format of language_dialect_country. Dialect and country are both ISO country codes (see Locale Details). Translations can be stored for a language (en), a language/dialect combination (en_GB), or a language/dialect/country combination (en_GB_nz). Translations should be assigned the shortest code that describes them; for example, any translations common for all of English should be assigned an "en" locale code. "en_US" should only be used if the translation applies only to those speaking U.S. English. "en_US_us" should only be used for those speaking U.S. English and are browsing from the United States. Though these codes are recommended, the system should allow for any string to key a locale off of, for use with the 'force locale' option (see SML Settings and Parent Language Support).
- Name will be the key for the translation mapping. All translations of a single phrase will be attached to a single name. This name can be the actual text (useful for missing translations in the db), or a short and readable name (better for SML code clarity).
- Translation will be the full translated text that corresponds to this specific locale for a single phrase identified by the Name.
Sample TSV* Phrasebook
page locale name translation
global sv featured_products Featured Products
page1 en choose_category Choose Category
page2 en popular_products Popular Products
page3 en top_contributors Top Contributors
page1 fr choose_category FR Choose Category
page2 fr popular_products FR Popular Products
page3 fr top_contributors FR Top Contributors
page1 es choose_category ES Choose Category
page2 es popular_products ES Popular Products
page3 es top_contributors ES Top Contributors
TSV is a Tab-separated table. A CSV (comma-separated table) will not work.
|